package com.nuoniu.sibanyun.entity.production;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 工序汇报——明细表
 * </p>
 *
 * @author 白强
 * @since 2022-01-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ma_process_report_datail")
@ApiModel(value="ErpWorkProcedureCardDetail对象", description="工序汇报——明细表")
public class ErpWorkProcedureCardDetail extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "账套id")
    @TableField("account_id")
    private Integer accountId;

    @ApiModelProperty(value = "公司id")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "主订单id")
    @TableField("order_id")
    private Integer orderId;

//    @ApiModelProperty(value = "汇报编号（派工单号+流水号）--废弃")
//    @TableField("report_code")
//    private String reportCode;

    @ApiModelProperty(value = "流水号--废弃")
    @TableField("serial_number")
    private Integer serialNumber;

    @ApiModelProperty(value = "生产批号--废弃")
    @TableField("batch_no")
    private String batchNo;

    @ApiModelProperty(value = "加工单ID")
    @TableField("production_work_main_id")
    private Long productionWorkMainId;

    @ApiModelProperty(value = "加工单号")
    @TableField("production_work_main_code")
    private String productionWorkMainCode;

    @ApiModelProperty(value = "加工单明细ID")
    @TableField("production_work_detail_id")
    private Integer productionWorkDetailId;

    @ApiModelProperty(value = "加工单工序明细ID")
    @TableField("production_work_procedure_detail_Id")
    private Integer productionWorkProcedureDetailId;

    @ApiModelProperty(value = "预计开工日期")
    @TableField("expect_start_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd" )
    private LocalDate expectStartDate;

    @ApiModelProperty(value = "预计完工日期")
    @TableField("expect_finish_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd" )
    private LocalDate expectFinishDate;

    @ApiModelProperty(value = "客户id")
    @TableField("crm_id")
    private Integer crmId;

    @ApiModelProperty(value = "客户名称")
    @TableField("crm_name")
    private String crmName;

    @ApiModelProperty(value = "产品ID")
    @TableField("inventory_id")
    private Long inventoryId;

    @ApiModelProperty(value = "产品名称")
    @TableField("inventory_name")
    private String inventoryName;

    @ApiModelProperty(value = "产品编码")
    @TableField("inventory_code")
    private String inventoryCode;

    @ApiModelProperty(value = "规格型号")
    @TableField("inventory_specification")
    private String inventorySpecification;

    @ApiModelProperty(value = "工艺路线id")
    @TableField("process_route_id")
    private Integer processRouteId;

    @ApiModelProperty(value = "工艺路线名称")
    @TableField("process_route_name")
    private String processRouteName;

    @ApiModelProperty(value = "工艺路线_工序明细ID")
    @TableField("process_route_detail_id")
    private Integer processRouteDetailId;

    @ApiModelProperty(value = "工序最新工价明细ID__后端赋值")
    @TableField("procedure_price_detail_Id")
    private Integer procedurePriceDetailId;

    @ApiModelProperty(value = "工序id")
    @TableField("procedure_id")
    private Integer procedureId;

    @ApiModelProperty(value = "工序名称")
    @TableField("procedure_name")
    private String procedureName;

    @ApiModelProperty(value = "工序编码")
    @TableField("procedure_code")
    private String procedureCode;

    @ApiModelProperty(value = "工序顺序")
    @TableField("procedure_order")
    private Integer procedureOrder;

    @ApiModelProperty(value = "工序标识 1:首工序 2：未工序 3：中间工序")
    @TableField("procedure_flag")
    private Integer procedureFlag;

    @ApiModelProperty(value = "班组id")
    @TableField("team_id")
    private Integer teamId;

    @ApiModelProperty(value = "班组名称")
    @TableField("team_name")
    private String teamName;

    @ApiModelProperty(value = "工人ID")
    @TableField("worker_id")
    private Integer workerId;

    @ApiModelProperty(value = "工人姓名")
    @TableField("worker_name")
    private String workerName;

    @ApiModelProperty(value = "状态（废弃）")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "计量单位ID")
    @TableField("unit_id")
    private Integer unitId;

    @ApiModelProperty(value = "计量单位名称")
    @TableField("unit_name")
    private String unitName;

    @ApiModelProperty(value = "合格数量")
    @TableField("qualified_quantity")
    private BigDecimal qualifiedQuantity;

    @ApiModelProperty(value = "不合格数量")
    @TableField("unqualified_quantity")
    private BigDecimal unqualifiedQuantity;

    @ApiModelProperty(value = "返工数量")
    @TableField("rework_quantity")
    private BigDecimal reworkQuantity;

    @ApiModelProperty(value = "报废数量")
    @TableField("scrap_quantity")
    private BigDecimal scrapQuantity;

    @ApiModelProperty(value = "不合格原因")
    @TableField("unqualified_reason")
    private String unqualifiedReason;

    @ApiModelProperty(value = "报废原因")
    @TableField("scrap_reason")
    private String scrapReason;

    @ApiModelProperty(value = "合格率")
    @TableField("qualified_rate")
    private BigDecimal qualifiedRate;

    @ApiModelProperty(value = "加工日期")
    @TableField("work_date")
    private LocalDate workDate;

    @ApiModelProperty(value = "加工开始时间")
    @TableField("work_begin_time")
    private LocalDateTime workBeginTime;

    @ApiModelProperty(value = "加工结束时间")
    @TableField("work_end_time")
    private LocalDateTime workEndTime;

    @ApiModelProperty(value = "工时(小时)")
    @TableField("work_hour")
    private BigDecimal workHour;

    @ApiModelProperty(value = "工时价格(小时)")
    @TableField("work_hour_price")
    private BigDecimal workHourPrice;

    @ApiModelProperty(value = "工资类型1:计件2:计时3:不核算")
    @TableField("wages_type")
    private Integer wagesType;

    @ApiModelProperty(value = "工价")
    @TableField("wages")
    private BigDecimal wages;

    @ApiModelProperty(value = "工价百分比(%)")
    @TableField("wages_percentage")
    private BigDecimal wagesPercentage;

    @ApiModelProperty(value = "工人工资")
    @TableField("worker_wages")
    private BigDecimal workerWages;

    @ApiModelProperty(value = "合格品价格")
    @TableField("qualified_price")
    private BigDecimal qualifiedPrice;

    @ApiModelProperty(value = "返修价格")
    @TableField("rework_price")
    private BigDecimal reworkPrice;

    @ApiModelProperty(value = "不合格价格")
    @TableField("unqualified_price")
    private BigDecimal unqualifiedPrice;

    @ApiModelProperty(value = "报废价格")
    @TableField("scrap_price")
    private BigDecimal scrapPrice;

    @ApiModelProperty(value = "计价依据")
    @TableField("price_basis")
    private String priceBasis;

    @ApiModelProperty(value = "质检方式 1:免检2:过程检验3:完工检验")
    @TableField("inspect_method")
    private Integer inspectMethod;

    @ApiModelProperty(value = "质检结果")
    @TableField("inspect_result")
    private Integer inspectResult;

    @ApiModelProperty(value = "质检员ID")
    @TableField("inspect_user_id")
    private Integer inspectUserId;

    @ApiModelProperty(value = "质检员姓名")
    @TableField("inspect_user_name")
    private String inspectUserName;

    @ApiModelProperty(value = "质检时间")
    @TableField("inspect_time")
    private LocalDateTime inspectTime;

    @ApiModelProperty(value = "工位ID")
    @TableField("station_id")
    private Integer stationId;

    @ApiModelProperty(value = "工位名称")
    @TableField("station_name")
    private String stationName;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "创建时间--  废弃")
    @TableField("create_date")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "创建人id--  废弃")
    @TableField("create_user_id")
    private Integer createUserId;

    @ApiModelProperty(value = "创建人--  废弃")
    @TableField("create_user_name")
    private String createUserName;

    @ApiModelProperty(value = "修改时间--  废弃")
    @TableField("update_date")
    private LocalDateTime updateDate;

    @ApiModelProperty(value = "修改人id--  废弃")
    @TableField("update_user_id")
    private Integer updateUserId;

    @ApiModelProperty(value = "修改人姓名--  废弃")
    @TableField("update_user_name")
    private String updateUserName;


    @ApiModelProperty(value = "来源单据")
    @TableField("source_voucher_id")
    private Integer sourceVoucherId;

    @ApiModelProperty(value = "来源单据号")
    @TableField("source_voucher_code")
    private String sourceVoucherCode;

    @ApiModelProperty(value = "来源单据")
    @TableField("source_voucher_type")
    private String sourceVoucherType;

    @ApiModelProperty(value = "来源单据日期")
    @TableField("source_voucher_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd" )
    private LocalDate sourceVoucherDate;



}
